﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class UserControls_ThuatToan_SapXep : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }
    protected void btn_Run_Click(object sender, EventArgs e)
    {
        try
        {
            string arrinput = txt_ArrInput.Text;
            
            
            String[] strarrinput = arrinput.Split(',');

            //strarrinput.OrderBy(
            Array.Sort(strarrinput, StringComparer.InvariantCulture);

            txt_Output.Text = strarrinput.ToString();

            lbl_MessageResult.Text = "Done!";
        }
        catch (Exception)
        {
            lbl_MessageResult.Text = "Lỗi input hoặc lỗi trong quá trình thực thi, hãy kiểm tra lại dữ liệu";
        }
        
    }
}